<div><a href="{$base_url}&action=post_create&blog={$blog->id}" class="add_item button"><span>Добавить пост</span></a></div>
<table class="list">
    <tr>
        <th class="_20">Публ.</th>
        <th class="_20">Ред.</th>
        <th>Название</th>
        <th>Автор</th>
        <th class="_20">Коментариев</th>
        <th class="_20">Удл.</th>
    </tr>
    {foreach $blog->Posts as $post}
        <tr>
            <td class="center">
                {if $post->active == 1}
                    <a href="{$base_url}&action=post_unactive&id={$post->id}"><img src="{$tpl_url}images/online.png" /></a>
                {else}
                    <a href="{$base_url}&action=post_active&id={$post->id}"><img src="{$tpl_url}images/busy.png" /></a>
                {/if}
            </td>
            <td class="center">
                <a href="{$base_url}&action=post_edit&id={$post->id}"><img src="{$tpl_url}images/pencil.png"/></a>
            </td>
            <td>
                <a href="{$base_url}&action=post_view&id={$post->id}">{$post->title}</a></td>
            <td>{$post->Author->login}</td>
            <td class="center">
                <a href="{$base_url}&action=post_view&id={$post->id}#comments">{count($post->Comments)}</a>
            </td>
            <td class="center">
                <a onclick="if(confirm('Вы дейтвительно желаете удалить этот блог и все записи в нём?')) location.href = this.href; return false;" href="{$base_url}&action=post_delete&id={$post->id}"><img src="{$tpl_url}images/trash.png"/></a>
            </td>
        </tr>
    {/foreach}
</table>